package com.ys.exception.base;

import com.ys.enu.ResultCodeEnum;
import lombok.Data;

/**
 * 参数异常类
 */
@Data
public class ParamException extends   BizException {

    private String msg="success";
    private Integer code=ResultCodeEnum.illegalargument.getCode();
    private Object data;

    public ParamException() {
    }

    public ParamException(String msg, Object data,Integer code) {
        this.msg = msg;
        this.data = data;
        this.code=code;
    }

    public ParamException(String msg, ResultCodeEnum resultCodeEnum) {
        this.msg=msg;
        this.code=resultCodeEnum.getCode();
    }
    public ParamException(String msg, Integer code) {
        this.msg = msg;
        this.code = code;
    }
}
